package yx.model;

import java.sql.Timestamp;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;
import org.hibernate.annotations.GenericGenerator;

/**
 * SmUser entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "sm_user", catalog = "")
public class SmUser implements java.io.Serializable {

	// Fields

	private Integer id;
	private Integer version;
	private String userName;
	private String password;
	private String realName;
	private String gender;
	private String mobile;
	private String phone;
	private String email;
	private String adminFlag;
	private String lockFlag;
	private Date startDate;
	private Date endDate;
	private Date lastModifyDate;
	private String roleCode;
	private String memo;
	private String deleteFlag;
	private Integer optId;
	private Timestamp optTime;

	// Constructors

	/** default constructor */
	public SmUser() {
	}

	/** full constructor */
	public SmUser(String userName, String password, String realName, String gender, String mobile, String phone, String email, String adminFlag, String lockFlag, Date startDate, Date endDate, Date lastModifyDate, String roleCode, String memo, String deleteFlag, Integer optId, Timestamp optTime) {
		this.userName = userName;
		this.password = password;
		this.realName = realName;
		this.gender = gender;
		this.mobile = mobile;
		this.phone = phone;
		this.email = email;
		this.adminFlag = adminFlag;
		this.lockFlag = lockFlag;
		this.startDate = startDate;
		this.endDate = endDate;
		this.lastModifyDate = lastModifyDate;
		this.roleCode = roleCode;
		this.memo = memo;
		this.deleteFlag = deleteFlag;
		this.optId = optId;
		this.optTime = optTime;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "ID", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Version
	@Column(name = "VERSION")
	public Integer getVersion() {
		return this.version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}

	@Column(name = "USER_NAME", length = 20)
	public String getUserName() {
		return this.userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	@Column(name = "PASSWORD", length = 32)
	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Column(name = "REAL_NAME", length = 128)
	public String getRealName() {
		return this.realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}

	@Column(name = "GENDER", length = 1)
	public String getGender() {
		return this.gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	@Column(name = "MOBILE", length = 32)
	public String getMobile() {
		return this.mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	@Column(name = "PHONE", length = 32)
	public String getPhone() {
		return this.phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	@Column(name = "EMAIL", length = 50)
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name = "ADMIN_FLAG", length = 1)
	public String getAdminFlag() {
		return this.adminFlag;
	}

	public void setAdminFlag(String adminFlag) {
		this.adminFlag = adminFlag;
	}

	@Column(name = "LOCK_FLAG", length = 1)
	public String getLockFlag() {
		return this.lockFlag;
	}

	public void setLockFlag(String lockFlag) {
		this.lockFlag = lockFlag;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "START_DATE", length = 10)
	public Date getStartDate() {
		return this.startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "END_DATE", length = 10)
	public Date getEndDate() {
		return this.endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "LAST_MODIFY_DATE", length = 10)
	public Date getLastModifyDate() {
		return this.lastModifyDate;
	}

	public void setLastModifyDate(Date lastModifyDate) {
		this.lastModifyDate = lastModifyDate;
	}

	@Column(name = "ROLE_CODE", length = 2)
	public String getRoleCode() {
		return this.roleCode;
	}

	public void setRoleCode(String roleCode) {
		this.roleCode = roleCode;
	}

	@Column(name = "MEMO", length = 128)
	public String getMemo() {
		return this.memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	@Column(name = "DELETE_FLAG", length = 1)
	public String getDeleteFlag() {
		return this.deleteFlag;
	}

	public void setDeleteFlag(String deleteFlag) {
		this.deleteFlag = deleteFlag;
	}

	@Column(name = "OPT_ID")
	public Integer getOptId() {
		return this.optId;
	}

	public void setOptId(Integer optId) {
		this.optId = optId;
	}

	@Column(name = "OPT_TIME", length = 19)
	public Timestamp getOptTime() {
		return this.optTime;
	}

	public void setOptTime(Timestamp optTime) {
		this.optTime = optTime;
	}

}